package jtk.project4.fleet.field;

import java.awt.Dimension;

import jtk.project4.fleet.action.AddEditPurchaseOrderAction;
import jtk.project4.fleet.action.PurchaseOrderAction;

import nl.coderight.jazz.action.Action;
import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.control.RadioControl;
import nl.coderight.jazz.form.field.button.CheckButton;
import nl.coderight.jazz.form.field.button.PushButton;
import nl.coderight.jazz.form.field.button.RadioButton;

public class ButtonBrowsePurchaseOrdersFields extends GroupControl<BrowsePurchaseOrdersField> {
	private PushButton addButton;
	private PushButton editButton;
	private PushButton deleteButton;
	private PushButton printButton;
	private PushButton poreceivedButton;
	private PushButton searchButton;
	private CheckButton check1 ;
	private Action addEditPurchaseOrder;
	
	public ButtonBrowsePurchaseOrdersFields(String bindID){
		addEditPurchaseOrder = new AddEditPurchaseOrderAction();
		setTitle("");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields(){
		addButton = new PushButton(addEditPurchaseOrder) ;
		addButton.setPreferredSize(new Dimension(70,20));
		editButton = new PushButton(addEditPurchaseOrder);
		editButton.setPreferredSize(new Dimension(70,20));
		deleteButton = new PushButton("delete");
		deleteButton.setPreferredSize(new Dimension(70,20));
		printButton = new PushButton("print");
		printButton.setPreferredSize(new Dimension(70,20));
		poreceivedButton = new PushButton("poreceived");
		poreceivedButton.setPreferredSize(new Dimension(100,20));
		searchButton = new PushButton("search");
		searchButton.setPreferredSize(new Dimension(70,20));
		check1 = new CheckButton("Show Row Filter");
		
	}
	
	private void createLayout() {
		setLayout(new FormLayout())
		.addField(addButton)
		.addField(editButton)
		.addField(deleteButton)
		.addField(printButton)
		.addField(poreceivedButton)
		.addField(searchButton)
		.addField(check1);
	}
	
	
}
